package algorithms;

import java.security.NoSuchAlgorithmException;

public class DeploymentAlgorithmFactory {

    public static final int SumOfDegree = 1;
    public static final int GroupDegree = 2;
    public static final int SumOfCloseness = 3;
    public static final int GroupCloseness = 4;
    public static final int SumOfShortestPathBetweenness = 5;
    public static final int GroupShortestPathBetweenness = 6;
    public static final int SumOfRandomWalkBetweenness = 7;

    public static DeploymentAlgorithm getDeploymentAlgorithm(int algo) throws NoSuchAlgorithmException {
        switch(algo){
            case SumOfDegree:
                return new SumOfDegree();
            case GroupDegree:
                return new GroupDegree();
            case SumOfCloseness:
                return new SumOfCloseness();
            case GroupCloseness:
                return new GroupCloseness();
            case SumOfShortestPathBetweenness:
                return new SumOfShortestPathBetweenness();
            case GroupShortestPathBetweenness:
                return new GroupShortestPathBetweenness();
            case SumOfRandomWalkBetweenness:
                return new SumOfRandomWalkBetweenness();
            default:
                throw new NoSuchAlgorithmException();
        }
    }
}
